package com.xw.childhealth.util;

public class PathUtil {
    private static String seperator = System.getProperty("file.separator");

    /**
     * 返回跟路径
     *
     * @return
     */
    public static String getImgBasePath() {
        String os = System.getProperty("os.name");
        String basePath = "";
        if (os.toLowerCase().startsWith("win")) {
            basePath = "D:/projectdev/xw/image/";
        } else {
            basePath = "/Users/renhuiyong/xw/image/";
        }
        basePath.replace("/", seperator);
        return basePath;
    }

    /**
     * 返回子路径
     *
     * @param shopId
     * @return
     */
    public static String getImgPath(String shopId) {
        String imagePath = "upload/" + shopId + "/";
        return imagePath.replace("/", seperator);
    }
}
